﻿using System.Collections.Generic;

namespace Script.UiSystem
{
    public class GlobalCache
    {

        /**
         * userId: 网络id
         */

        public static int PlayerNetId;
        
        private static Dictionary<string, object> data = new Dictionary<string, object>();

        public static void AddData(string key, object value)
        {
            data[key] = value;
        }
        
        public static object GetData(string key)
        {
            return data[key];
        }

        public static object GetDataRemove(string key)
        {
            object temp = data[key];
            data.Remove(key);
            return temp;
        }

    }
}